package com.woniu.command.purchaseCommand;

import com.woniu.command.Command;
import com.woniu.command.CommandString;
import com.woniu.command.handler.InventoryCommandHandler;
import com.woniu.command.handler.PurchaseCommandHandler;
import com.woniu.outlet.po.InventoryPo;
import com.woniu.util.ApplicationContextHolder;

public class UpdatePurchaseCommand implements CommandString<Long> {
    private PurchaseCommandHandler handler;

    public UpdatePurchaseCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(PurchaseCommandHandler.class);
    }

    @Override
    public String execute(Long code) {
        String s = handler.updatePurchaseStatus(code);
        return s;
    }
}
